package com.chentf.ssh.action;

import com.chentf.ssh.entity.User;
import com.chentf.ssh.service.UserService;
import com.opensymphony.xwork2.Action;
import lombok.Getter;
import lombok.Setter;

/**
 * @author chentengfei
 * @desc ...
 * @date 2021-01-30 21:57:17
 */
public class RegAction implements Action {
    @Getter
    @Setter
    private UserService userService;

    //<input type="text" name="user.name"/>
    @Getter
    @Setter
    private User user;

    @Override
    public String execute() throws Exception {
        userService.register(user);
        return Action.SUCCESS;
    }
}
